package com.view;

import javax.swing.*;
import java.awt.*;

public class RockPaperScissorsWindow extends JFrame {
    private JPanel jPanel;
    private JComboBox comboBox;

    public RockPaperScissorsWindow(String title) throws HeadlessException{
        super(title);
        setSize(500,600);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }
    private void init(){
        FlowLayout layout = new FlowLayout(25, 26, 90);
        //GroupLayout layout1 = new GroupLayout(25,25,30);
        jPanel = new JPanel(layout);

        String[] ListData = new String[]{"人","电脑"};
        comboBox = new JComboBox<>(ListData);

        JButton button = new JButton("button1");

        jPanel.add(comboBox);
        jPanel.add(button);

        setContentPane(jPanel);
    }
}
 
